


//http://www.hesido.com/web.php?page=javascriptanimation

booky.effects = {

    slide: function(el, startTop, endTop, steps, intervals, powr) {
        if(el.slideDownMemInt) 
            window.clearInterval(el.slideDownMemInt);
        var actStep = 0;
        
        el.slideDownMemInt = window.setInterval(
        function() {
        
            el.style.top = booky.effects.easeInOut(startTop, endTop, steps, actStep, powr) + "px";
            
            actStep++;
            if (actStep > steps) window.clearInterval(el.slideDownMemInt);
        }, intervals);
    },

    easeInOut: function(minV, maxV, totalSteps, actualStep, powr) {
        //Generic Animation Step Value Generator By www.hesido.com 
        var delta = maxV - minV,
            stepp = minV + (Math.pow(((1 / totalSteps) * actualStep), powr) * delta);
        return Math.ceil(stepp);
    }

};



